package com.first.orange.mapper;

import com.first.orange.beans.Cart;
import com.first.orange.beans.UserCollection;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CartMapper {

/**
 * Created on 2021/7/6.
 *
 * Author: 190120
 *
 * Description: 
 */

    List<Cart> selectCartList(Integer userId);

    int deleteCart(@Param("carId") Integer carId,@Param("userId")Integer userId);

    int insertCarts(Cart cart);

//    int insertCart(Cart cart);

    int insertColl(@Param("productId") Integer productId, @Param("userId")Integer userId);

    int upCarts(@Param("carId")String carId,@Param("checked")String checked,@Param("quantity")String quantity, @Param("amount")String amount);

    int upAllCarts(@Param("checked")String checked,@Param("che") String che);

    UserCollection selectcoll(@Param("productId")Integer productId, @Param("userId") Integer userId);

    Cart selectCartByUTPP(Cart cart);

    int upCart(Cart cart);
}
